This application makes reference to, incorporates the same herein, and claims all benefits accruing under 35 U.S.C xc2xa7119 from an application entitled An Apparatus And Method For Processing Image earlier filed in the Korean Industrial Property Office on Nov. 29, 1997, and there duly assigned Serial No. 97-64374 by that Office, and an application entitled An Apparatus And Method For Processing Image earlier filed in the Korean Industrial Property Office on Dec. 17, 1997, and there duly assigned Serial No. 97-70034 by that Office.
1. Field of the Invention
The present invention relates to an apparatus and a method for image processing, and more particularly to an apparatus and a method for image processing capable of improving a quality of an image by correcting a distortion, of an image reading sensor or a light source for analog signals proportional to quantity of light which is reflected in accordance with state of an object and obtaining a fine image by controlling a contrast and a brightness of the object and removing a background color of the object.
2. Description of the Prior Art
In general, a scanner emits light to an object and converts the light reflected by the object into an electric output value through a charge coupled device (hereinafter, referring to as CCD) and a contact image sensor (hereinafter, referring to as CIS). The output value is generally stored in a data storing device such as a harddisc of a personal computer.
The scanner which reads contents of the object such as books and pictures is made to carry out only a scanning function, or is integrated with a printer and a facsimile device.
An analog signal which is output from a CCD sensor as a photoelectric conversion device in a general color image processing device has a deviation due to an object difference between pixels of a CCD sensor as a semiconductor element. When the scanner reads an image, a quality of the image is degraded due to a distortion of a white reference plate and light emitting characteristics of a halogen lamp or a fluorescent lamp which is used as a light source.
In order to prevent the quality degradation of the image which is induced by the circuit element and parts, a black correction is carried out to correct the object difference due to an element characteristic of CCD sensor in the inputting device. Also, a white correction is carried out to remove an effect on the image due to the distortion of the white reference plate and the light source such as the fluorescent lamp or the halogen lamp.
In general, a method for correcting the distortion of the color image inputting device has three steps. That is, the method for correcting the distortion of the color image includes the steps of: reading a quantity of dark current which is output from pixels of the CCD sensor to obtain a black correcting data and then subtracting the black correcting data from the analog signals which are output from the CCD sensor in the state that a light is not input into the CCD sensor; detecting a maximum value of an image signal which is output after applying an electric power to the electric source and carrying out the black correction for the analog signal reflected by the white reference plate; and carrying out an operation for regulating the white correcting data, which is generated by detecting the distortion of the white reference plate and the light source in the range between the black reference voltage and the maximum value of the analog signal reflected by the white reference plate after applying the electric power to the light source.
The correcting the distortion of the color image inputting device will be described in detail with reference to FIG. 1. As shown in FIG. 1, during output of the analog image signal, by driving a CCD sensor (not shown) in the state that the electric power is not applied to a light source (not shown) of the CCD sensor, an analog to digital converter 201 (hereinafter, referring to as A/D converter) carries out an operation to obtain the black correcting data while the analog image signal, which is output from the CCD sensor in the range between a black reference voltage VBref and a black maximum voltage VBmax, is converted into digital data, which in turn is stored in a memory 202 for as the black correcting data for correcting black. Memory 202 has a storage capability proportional to the number of effective pixels of the CCD sensor, in which the black correcting data are stored in an order corresponding to an output synchronous signal of the CCD sensor. Then, the electric power is applied to the light source so as to detect light reflected by a white reference plate (platen) into the CCD sensor. The black correcting data are converted into their analog value by a digital to analog converter 203 (hereinafter, referring to as D/A converter). A black correcting device 204 carries out the operation for correcting black by subtracting the analog values of the black correcting data from the analog image signal output from the CCD sensor. The black corrected analog image signal is input into an A/D converter 205 is converted into digital data in the range between a white maximum voltage VWmax and the black reference voltage VBref. These digital data are then input in into a detector 206 for detecting a maximum digital value, and the maximum digital valueis converted to an analog signal VPEAK (maximum value of pixel data of the white reference plate) by a D/A converter 207. An A/D converter 208 converts the black corrected analog image signal into digital data in the range between the black reference value VBref and the maximum value of pixel data VPEAK. These digital data are stored in a memory 209 as white correcting data for correcting white.
Accordingly, when the operation is carried out to read a substantial image of an object (such as a color picture or a document), the electric power is applied to the light source to input the light reflected by the object into the CCD sensor. When an image of an object is detected by the CCD sensor, black correcting device 204 carries out the operation for correcting the black of the data in response to the black correcting data transmitted from the black correcting memory 202 to the black correcting device 204 through the D/A converter 203. White correcting device 211 carries out the operation for correcting the white of the black corrected image, output from correcting device 204, in response to the white correcting data transmitted from the white correcting memory 209 to white correcting device 211 through D/A converter 210. The image signal of which the distortion is corrected (black corrected and white corrected) is converted into digital image data between the black reference voltage VBref which the:data, which are transmitted through the A/D converter 212 and the data bus and stored in a latch 215, are converted into by the D/A converter 214 and the white reference voltage VBref which the data, which are stored in the latch 216 through the data bus, are converted into by D/A converter 213. Therefore, the image of the object can be read by using the digital data.
Here, in the color image inputting apparatus presently produced, an application specific integrated circuit (hereinafter, referring to as ASIC) is used as a circuit which carries out correction of the distortion.
In the image processing according to the present invention, however, since given values in a predetermined range are selectively used to control the contrast and brightness of the image by necessity, there is a problem in that when the values are better applied to the object, the control program of the image inputting apparatus is modified to reset appropriate parameters according to the condition of the object.
The present invention has been made to overcome the above described problem of the prior art.
It is an object of the present invention to provide an apparatus and a method for processing an image, in which a user can print the best image responding to a function selected by the user by adding to a program of the inputting device functions of removing a distortion and a background color of the images and controlling a contrast and a brightness of the image with respect to conversion of an analog image signal to a digital image signal,
To accomplish the above object of the present invention, according to an aspect of the present invention, there is provided an apparatus for processing image comprising: an A/D converter for converting an analog image signal with respect to document data which are detected and input by image reading sensor of the image inputting device into digital data by using a control signal input from a controller of a image inputting device, a changed value of a contrast input from the control section, and a changed value of a brightness an upper limited reference voltage setting means for setting the upper limited reference voltage so that the A/D converter performs a correcting of image distortion and a processing of image a lower limited reference voltage setting means for setting the lower reference voltage so that the A/D converter performs a correcting of image distortion and a processing of image; a black correcting memory for storing a black correcting data out put after the A/D converter performs an operation of converting the analog signal into digital signal; a white correcting memory for storing a black correcting data output after the A/D converter performs an operation of converting the analog signal into the, digital signal; and a maximum value detector for detecting a maximum pixel data value from digital image data output from the A/d converter. The control signal includes: a signal for selecting a mode of reading a magnitude of a black current output from pixels of the image reading sensor; a signal for selecting a mode of reading a maximum value of an image signal output after a black correcting operation is performed with respect to an analog signal reflected by a white reference plate of the image inputting device, a signal for selecting a mode of performing an equalization of the image after detecting distortions of a light source and the white reference plate of the image inputting device; a signal for selecting a mode of controlling a contrast to control the contrast of the document; and a signal for selecting a mode of removing a background color to remove the background color from the document. The signal for selecting the mode of removing the background color includes a signal for selecting a maximum pixel value of the document obtained in a prescanning mode as the upper limited voltage. The upper limited reference voltage setting means includes; a first adder for adding a changed value of the upper limited value input from the controller for controlling the contrast to the data output from the white correcting memory and adding the upper limited value for controlling the brightness input from the controller to the data output from the white correcting memory so as to obtain the upper limited reference voltage; a first selector for selecting any one of a value output from the first adder, a value output from the maximum value detector, and a preset and input value according to the operation signal of the image inputting device; and a first D/A converter for receiving the value selected by the first selector as an input value and converting the input value into the analog signal. The lower limited reference voltage setting means includes: a second adder for adding a changed value of the lower limited value input from the controller for controlling the contrast to the data output from the black correcting memory so as to obtain the lower limited reference voltage; a second selector for selecting any one of a value output from the black correcting memory and a preset and input value according to an operation signal of the image inputting device; and a second D/A converter for receiving the value selected from the second selector as an input value and converting the input value into the analog signal.
According to another aspect of the present invention, there is provided an apparatus for processing image comprising: an A/D converter for converting an analog image signal with respect to document data which are detected and input by image reading sensor of the image inputting device into digital data by using a control signal input from a controller of a image inputting device, a changed value of a contrast input from the control section, and a changed value of a brightness; an upper limited reference voltage setting means for setting the upper limited reference voltage so that the A/D converter performs a correcting of image distortion and a processing of image; a lower limited reference voltage setting means for setting the lower reference voltage so that the A/D converter performs a correcting of image distortion and a processing of image; a black correcting memory for storing a black correcting data output after the A/D converter performs an operation of converting the analog signal into digital signal; a white correcting memory for storing a black correcting data output after the A/D converter performs an operation of converting the analog signal into the digital signal; a maximum value detector for detecting a maximum pixel data value from digital image data output from the A/d converter; and a reference data storing means for storing data output from the maximum value detector. The control signal includes: a signal for selecting a mode of reading a magnitude of a black current output from pixels of the image reading sensor; a signal for selecting a mode of reading a maximum value of an image signal output after a black correcting operation is performed with respect to an analog signal reflected by a white reference plate of the image inputting device; a signal for selecting a mode of performing an equalization of the image after detecting distortions of a light source and the white reference plate of the image inputting device; a signal for selecting a mode of controlling a contrast to control the contrast of the document data; and a signal for selecting a mode of removing a background color to remove the background color from the document data. The signal for selecting the mode of removing the background color includes a signal for selecting a maximum pixel value of the document obtained in a prescanning mode as the upper limited voltage and a signal for selecting a maximum pixel value in a main scanning line of the image inputting device as the upper limited reference voltage if an intensity of the background is changed in the document data. The upper limited reference voltage setting means includes; a first D/A converter for receiving a value output from the reference data storing section; a first adder for adding a changed value of the upper limited value input from the controller for controlling the contrast to the data output from the white correcting memory and adding the upper limited value for controlling the brightness input from the controller to the data output from the white correcting memory so as to obtain the upper limited reference voltage; a second D/A converter for receiving a value output from the first adder as an input value and converting the input value into an analog signal; electrostatic voltage generators for generating the black correcting value and a reference voltage for detecting the maximum value; and a first analog switch for selecting any one of data output from the first D/A converter, the second D/A converter, and the electrostatic generators according to the control signal so as to set the one of data as the upper limited reference voltage of the A/D converter. The electrostatic generators includes a maximum black voltage generator for generating the upper limited reference voltage to create the black correcting value and a maximum white voltage generator for generating the upper limited reference voltage to detect the maximum value. The lower limited reference voltage setting means includes: a black reference voltage generator for generating a lower limited reference voltage to create the black correcting value; a second adder for adding a changed value of a lower limited value for controlling a contrast input from the controller to data output from the black correcting memory so as to obtain a lower limited reference voltage; a third D/A converter for receiving a value output from the second adder as an input value and converting the input value into an analog signal; and a second analog signal for selecting any one of data output from the third D/A converter and the black reference voltage generator so as to set the lower limited reference voltage of the A/D converter according to the control signal. The reference data storing means includes: a first latch for storing a maximum pixel value for a white reference plate of the image inputting device; a second latch for storing a maximum pixel value of a document data obtained by prescanning the document; and a third latch for storing a maximum pixel value in a main scanning line of the image inputting device.
According to still another aspect of the present invention, there is provided a method for processing image which includes the steps of generating reference data so as to correct a distortion of the image; determining which operation is selected from operations for respectively controlling a contrast and a brightness, and for removing a background color of the image; generating an upper limited reference voltage and a lower limited reference voltage corresponding to the selected operation; and performing a white correction and a black correction of the image simultaneously by using the reference data while performing out the selected operation for the image by using the upper limited reference voltage and the lower limited reference voltage which are set.
According to the present invention, black correcting data, a maximum data value of pixels, and white correcting data are used as the reference data. The black correcting data are used for correcting deviation due to an object difference according to an element characteristic of an image reading sensor mounted in an image inputting apparatus while the white correcting data are used for removing an effect on the image due to a distortion of a white reference plate and a light source mounted in the image inputting apparatus.
According to the present invention, the step for setting the upper limited reference voltage and the lower limited reference voltage to control the contrast of the image includes the steps of: multiplying a contrast control level by a changed value of the contrast; generating the upper limited reference voltage by reducing a multiplied value from a white correcting data which are output from the white correcting memory; and generating the lower limited reference voltage by subtracting the multiplied value from a black correcting data which are output from the black correcting memory. The changed value of the contrast can be obtained by dividing the maximum value of pixel of the white reference plate in the image inputting apparatus by the control level of the contrast.
According to the present invention, the step for setting the upper limited reference voltage and the lower limited reference voltage to control the brightness includes the steps of multiplying a brightness control level by a changed value of the upper limited reference values; generating the upper limited reference value by subtracting the multiplied value from a white correcting data which are output from the white correcting memory, and generating a lower limited reference voltage for a black correcting data which are output from the black correcting memory. The changed value of the upper limited reference values is obtained by subtracting a maximum pixel value of image which is detected during a prescanning from the maximum pixel value of the white reference plate in the image inputting apparatus and by dividing the reduced value by a maximum control level of the brightness.
According to the present invention, furthermore, the maximum pixel value of the image which is detected by the detector for measuring the maximum value is used as the upper limited reference value while the black correcting data which is output from the black correcting memory is used as a maximum control level of the brightness, in order to remove the background color. The image of the object of which the distortion is corrected and for which the selected operation is carried out is output in a form of a digital image.